package com.springboot.astra.service.serviceImpl;

import com.springboot.astra.bean.Address;
import com.springboot.astra.mapper.AddressMapper;
import com.springboot.astra.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    AddressMapper addressMapper;

    @Override
    public List<Address> getALLById(Integer id) {
        return addressMapper.getALLById(id);
    }

    @Override
    public void insertAddress(Address address) {
        addressMapper.insertAddress(address);
    }

    @Override
    public void updateOneById(Address address) {
        addressMapper.updateOneById(address);
    }

    @Override
    public void deleteOneById(Integer id) {
        addressMapper.deleteOneById(id);
    }
}
